The invention relates generally to video graphics processing and more particularly to a method and apparatus for managing compressed Z information in a video graphics system that supports anti-aliasing.
Computers are used in many applications. As computing systems continue to evolve, the graphical display requirements of the systems become more demanding. This is especially true in the area of three-dimensional (3D) graphics processing. In order to process 3D graphics images, the position of graphics primitives with respect to the display must be understood in all three dimensions. This includes the dimension of depth, often referred to as the Z dimension. The Z dimension describes the positioning of a video graphics primitive with respect to other video graphics primitives within the display frame in terms of the depth, or distance from the viewer, of the video graphics primitives.
Computer displays and other high resolution display devices such as high definition televisions (HDTVs), projectors, printers, plotters, and the like, present an image to the viewer as an array of individual picture elements, or pixels. The individual pixels are given a specific color, which corresponds to the color of the image at the location of the particular pixel. The pixels are closely spaced, and the viewer""s visual system performs a filtering of individual pixel colors to form a composite image. If the partitioning of the image into individual pixel elements is performed properly, and the pixels are close enough together, the viewer perceives the displayed array of pixels as a virtually continuous image.
In many systems, graphical images for display are sampled, and the image is regenerated based on the stored samples. When the conservation of the detail is important, oversampling is typically utilized in order to avoid aliasing in the reconstructed graphical image. Oversampling techniques are well known in the art. In an oversampling system, multiple samples of each screen element, or pixel, are stored. Although each pixel is rendered using only a single color value, each of the samples for that particular pixel are used in generating the final color. In effect, a much more detailed, or higher-resolution, version of the image is stored within the computer, and this version is used to generate each of the colors for the pixels displayed on the screen.
Conventional oversampling systems in video graphics systems can require large amounts of memory. For example, if a system stores 8 samples for each particular pixel in memory and each sample includes 16 bits of color information and a 16-bit depth, or xe2x80x9cZxe2x80x9d, value, the memory requirements for a high-quality image which is 640xc3x97480 pixels is nearly 10 million bytes. The disadvantages of this amount of memory usage are apparent. First, the memory for such storage must be provided. Second, the memory accesses required to store and retrieve the data can consume large amounts of bandwidth within the computing system.
In order to present a smooth and continuous image on the display, the processing entity processing the video graphics images must maintain a high rate of pixel processing. In order to achieve high rates of pixel processing, pixel data stored in memory must be retrieved, processed, and then stored back in the memory in an efficient manner. Pixel fragments that are received may include a number of samples for a pixel where each sample includes a Z value and a color value. These fragments also include X and Y coordinates that specify, with respect to the display frame, the particular pixel with which the fragment corresponds. In an oversampling system, the Z values of the samples of the fragment are compared with stored Z values of the samples for the particular pixel. If it is determined that samples of fragment are located in front of one or more of the pixel samples (the Z value of the fragment sample indicates less spatial depth), the Z value and color value corresponding to the samples of the fragment that lie in front of the stored samples must be written in the memory that stores the data corresponding to that particular pixel. Typically, the memory storing the pixel information is referred to as the frame buffer.
The memory bandwidth required to fetch the stored sample data and then rewrite the result of any blending operations that combine the fragment with the current pixel state can be substantial. This is even more evident in oversampling systems that store many samples per pixels. The memory bandwidth consumption for these operations can have detrimental effects on other portions of the system that also must access the frame buffer.
One solution is to increase the amount of memory bandwidth available in the system. However, additional memory bandwidth translates into increased cost. This can be due to the requirement for faster, more expensive memories or more memories that can operate in parallel. Parallel memory structures are undesirable as they add complexity to the system and can increase costs of manufacturing 3D graphics processing systems.
Therefore, a need exists for a method and apparatus for reducing the memory bandwidth requirements in a 3D video graphics system that includes anti-aliasing oversampling.